There are known x-ray detectors, for example directly converting x-ray detectors, in which a scintillator element is adhesively attached to a detection area of a photodiode by way of an optically transparent adhesive, for example an epoxy resin. An intensity of a scintillation light produced in the scintillator element is attenuated when the adhesive is penetrated. This detracts from the sensitivity of the x-ray detector.